import { defHttp } from '@/utils/http/axios'
import { GetAccountInfoModel } from '../demo/model/accountModel'

enum Api {
  GET_BUDGET_LIST = '/budget/manager/page',
  UPDATE_BUDGET_RECORD = '/budget/manager/addValue',
  DELETE_BUDGET_RECORD = '/budget/manager/remove',
  ADD_BUDGET_RECORD = '/budget/manager/addDef',
}

export const getBudgetList = (params) =>
  defHttp.get<GetAccountInfoModel>({ url: Api.GET_BUDGET_LIST, params })
export const deleteBudgetList = (params) =>
  defHttp.delete<GetAccountInfoModel>({ url: Api.DELETE_BUDGET_RECORD, params })
export const updateBudgetRecord = (data) =>
  defHttp.post<GetAccountInfoModel>({ url: Api.UPDATE_BUDGET_RECORD, data })
export const addBudgetRecord = (data) =>
  defHttp.post<GetAccountInfoModel>({ url: Api.ADD_BUDGET_RECORD, data })
